// CaculateDlg.cpp : implementation file
//

#include "stdafx.h"
#include "CaculateDlg.h"
#include "CAppSettings.h"
#include "dmSettingAPI.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCaculateDlg dialog


CCaculateDlg::CCaculateDlg(CWnd* pParent /*=NULL*/)
	: CBCGPDialog(CCaculateDlg::IDD, pParent)
{
	EnableVisualManagerStyle(TRUE,TRUE);
	//{{AFX_DATA_INIT(CCaculateDlg)
	m_bin = 10;
	m_from = 0.0;
	m_to = 0.2;
	//}}AFX_DATA_INIT
	m_bin = CAppSettings::CalBin;
	m_from = CAppSettings::CalFrom;
	m_to = CAppSettings::CalTo;
}

CCaculateDlg::~CCaculateDlg()
{
	CAppSettings::CalBin = m_bin;
	CAppSettings::CalFrom = m_from;
	CAppSettings::CalTo = m_to;
}

void CCaculateDlg::DoDataExchange(CDataExchange* pDX)
{
	CBCGPDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CCaculateDlg)
	DDX_Text(pDX, IDC_CA_BIN, m_bin);
	DDV_MinMaxInt(pDX, m_bin, 1, 10);
	DDX_Text(pDX, IDC_CA_FROM, m_from);
	DDX_Text(pDX, IDC_CA_TO, m_to);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CCaculateDlg, CBCGPDialog)
	//{{AFX_MSG_MAP(CCaculateDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCaculateDlg message handlers

BOOL CCaculateDlg::OnInitDialog() 
{
	CBCGPDialog::OnInitDialog();
	
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
